package ${basePackage}.model;

import lombok.Data;


<#macro generateModel indent model>
<#if model.description??>
${indent}/**
${indent}*${model.description}
${indent}*/
</#if>
${indent}public ${model.type} ${model.fieldName}<#if model.defaultValue??>=${model.defaultValue?c}</#if>;
</#macro>
/**
 * @version 1.0
 * @Author moresuo
 * @Date 2024/9/8 17:11
 * @注释 静态模版配置
 */
@Data
public class DataModel {

<#list modelConfig.models as modelInfo>


    //有分组
    <#if modelInfo.groupKey??>
        /**
        *${modelInfo.description}
        */
        public ${modelInfo.type} ${modelInfo.groupKey}=new ${modelInfo.type}();

        /**
        *${modelInfo.description}
        */
        @Data
        public static class ${modelInfo.type}{
        <#list modelInfo.models as model>
            <@generateModel indent="        " model=model></@generateModel>
        </#list>

        }
    <#else >
        <@generateModel indent="    " model=modelInfo></@generateModel>
    </#if>
</#list>
}
